package com.qd.common.flow.domain.bill;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 〈一句话功能简述〉<br>
 *
 * @author sjk
 * @create 2024-02-28 15:05
 * @since 1.0.0
 */
@Data
public class FlowProcessTreeDTO {

    /**
     * 流程创建信息
     */
    private FlowCreateDTO flowCreate;
    /**
     * 节点信息
     */
    private List<ApprovalDTO> approvalList;

    public void freeData() {
        this.flowCreate = null;
        this.approvalList = null;
    }

    @Data
    public static class ApprovalDTO {
        /**
         * 流程ID
         */
        private String processId;
        /**
         * 节点ID
         */
        private String nodeId;
        /**
         * 序号
         */
        private Integer nodeNumber;
        /**
         * 审批部门ID
         */
        private String approvalDepart;
        /**
         * 审批部门
         */
        private String approvalDepartName;
        /**
         * 进行状态:2未开始 0进行中 1已结束
         */
        private Integer state;
        /**
         * 审批人姓名
         */
        private String approvalName;
        /**
         * 审批人所在单位名称
         */
        private String approvalOrgName;
        /**
         * 时间
         */
        private LocalDateTime addTime;

        public void freeData() {
            this.processId = null;
            this.nodeId = null;
            this.nodeNumber = null;
            this.approvalDepart = null;
            this.approvalDepartName = null;
            this.state = null;
            this.approvalName = null;
            this.approvalOrgName = null;
            this.addTime = null;
        }
    }

    @Data
    public static class FlowCreateDTO {
        /**
         * 流程发起人ID
         */
        private String processUserId;
        /**
         * 流程发起组织ID
         */
        private String processOrg;
        /**
         * 流程发起人
         */
        private String processUserName;
        /**
         * 流程发起组织
         */
        private String processOrgName;
        /**
         * 业务状态:0进行中1已结束
         */
        private Integer billState;
        /**
         * 流程发起时间
         */
        private LocalDateTime initiationTime;

        public void freeData() {
            this.processUserId = null;
            this.processOrg = null;
            this.processUserName = null;
            this.processOrgName = null;
            this.billState = null;
            this.initiationTime = null;
        }
    }

}
